import { reactive, ref } from 'vue'

export function useMenuBounding() {

	// 设置导航栏高度
	let statusBarHeight = ref(null)
	let navBarHeight = ref(null)

	onMounted(() => {
		statusBarHeight.value = uni.getSystemInfoSync()['statusBarHeight'];
		const custom = uni.getMenuButtonBoundingClientRect()
		navBarHeight.value = custom.height + (custom.top - statusBarHeight.value) * 2
		console.log("statusBarHeight高度：" + statusBarHeight.value)
		console.log("navBarHeight高度：" + navBarHeight.value)
	})

	return { statusBarHeight, navBarHeight }
}